package function;
import course.Course;
import course.CourseList;

public class ShowFunction implements IFunction{
    @Override
    public void work(CourseList courseList) {
        System.out.println("显示所有课程");
        //通过课程数组中的元素个数来遍历数组，以实现显示所有数组元素
        for (int i = 0; i < courseList.getUsedsize(); i++) {
            Course course=courseList.getCourse(i);
            System.out.println(course);
        }
    }
}
